﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business;
using Entity;
using System.Data;
using System.Data.SqlClient;


public partial class MayGiaCong : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
        if (!IsPostBack)
        {
            this.HienDS();
        }
    }

    void HienDS()
    {
        DataTable Sp = BSanPham.SelectAll();
        DataList1.DataSource = Sp;
        DataList1.DataBind();
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ImageButton btn = (ImageButton)sender;
        int MaSP = int.Parse(btn.CommandArgument);
        Response.Redirect("MayGiaCongChiTiet.aspx?MaSP=" + MaSP);
    }

    protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
    {
        ImageButton btn = (ImageButton)sender;
        int MaSP = int.Parse(btn.CommandArgument);
        Response.Redirect("MayGiaCongChiTiet.aspx?MaSP=" + MaSP);
    }
}